# $OpenBSD: profile,v 1.1.1.1 2016/10/10 17:19:47 jasper Exp $

RDECK_BASE=${TRUEPREFIX}/rundeck
export RDECK_BASE

JAVA_HOME=$(/usr/local/bin/javaPathHelper -h rundeck)
export JAVA_HOME

PATH=$JAVA_HOME/bin:$RDECK_BASE/tools/bin:$PATH
export PATH

export JAVA_CMD=$JAVA_HOME/bin/java

if test -t 0 -a -z "$RUNDECK_CLI_TERSE"
then
  RUNDECK_CLI_TERSE=true
  export RUNDECK_CLI_TERSE
fi

if test -n "$JRE_HOME"
then
   unset JRE_HOME
fi

LIBDIR=$RDECK_BASE/tools/lib

CLI_CP=
for i in `ls $LIBDIR/*.jar`
do
 CLI_CP=${CLI_CP}:${i}
done
export CLI_CP

#
# Set min/max heap size
#
export RDECK_JVM="$RDECK_JVM -Xmx1024m -Xms256m -XX:MaxPermSize=256m -server"

export RDECK_SSL_OPTS="-Djavax.net.ssl.trustStore=$RDECK_BASE/etc/truststore -Djavax.net.ssl.trustStoreType=jks -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol"

umask 002
